<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[#include "/admin/include/head.htm"]
    <script charset="utf-8" src="${path}/resources/plug/kindeditor/kindeditor.js"></script>
</head>
<script>
    KindEditor.ready(function (K) {
        var editor1 = K
                .create(
                        'textarea[name="content"]',
                        {
                            cssPath: '${path}/resources/plug/kindeditor/plugins/code/prettify.css',
                            uploadJson: '${path}/system/upload/submit.aspx',
                            fileManagerJson: '${path}/resources/plug/kindeditor/jsp/file_manager_json.jsp',
                            allowFileManager: true,
                            afterCreate: function () {
                                var self = this;
                                K.ctrl(document, 13, function () {
                                    self.sync();
                                    document.forms['example'].submit();
                                });
                                K.ctrl(self.edit.doc, 13, function () {
                                    self.sync();
                                    document.forms['example'].submit();
                                });
                            },
                            afterBlur: function () {
                                this.sync();
                            }
                        });
        prettyPrint();
    });
</script>
<script type="text/javascript">
    $(function () {
        var mainform = $("#form1");
        //表单底部按钮
        LG.setFormDefaultBtn(function () {
            history.back();
        }, function () {
            LG.submitForm(mainform, function (data) {
                if(data.type = "success"){
                    LG.showSuccess(data.content,function () {
                        history.go(-1);
                    });

                }else{
                    LG.showError(data.content);
                }

            });
        })
    });
</script>
<body>
<div class="main_admin_content">
    <h2 class="list-title">类别编辑</h2>
    <form name="form1" method="post" action="${path}/admin/articleCate/edit.aspx">
        <table class="main_edit_table">
            <tr>
                <th colspan="100">新闻公告类别编辑</th>
            </tr>

            <tr>
                <td>标题：</td>
                <td><input type="hidden"
                           value="${typeinfo.id}" name="typeid"/>
                    <input name="name"
                                                                         type="text" value="${typeinfo.name}"/>
                </td>
            </tr>
            <tr>
                <td>英文名：</td>
                <td>
                    <input name="cate_name"
                           type="text" value="${typeinfo.cate_name}"/>
                </td>
            </tr>


            <tr>
                <td>类型：</td>
                <td>
                [@u.radio  name="type" list={'0': '正文', '1':'列表'}   value=newsType.type /]
                </td>
            </tr>
            <tr>
                <td>内容：</td>
                <td>
                    <textarea  name="content">${(newsType.content)!''}</textarea>

                </td>
            </tr>

            <tr>
                <td colspan="100" class="btn_td"><input type="submit" name="submit"
                                                        value="确认提交" class="btn_blue large"/> <input
                        class="btn_blue large" type="reset" name="reset" value="重置表单"/>
                </td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>